<?php
namespace Home\Controller;
use Think\Controller;
use Think\Exception;
/**继承公共控制器**/
class IndexController extends CommonController {
    public function index($type=''){ 
      //排行榜获取
      $rankNews=$this->getRank();  
      //大图获取  
      $topPicNews=D("PositionContent")->select(array('status'=>1,'position_id'=>2),1);  
      //小图获取
      $topSmallNews=D("PositionContent")->select(array('status'=>1,'position_id'=>3),3); 
      //新闻排列
      $listNews = D("News")->select(array('status'=>1,'thumb'=>array('neq','')),10);
      // print_r($listNews);exit;
      $advNews=D("PositionContent")->select(array('status'=>1,'position_id'=>5),2);
    
      $this->assign('result',array(
          'topPicNews'=>$topPicNews,
          'topSmallNews'=>$topSmallNews,
          'listNews'=>$listNews,
          'advNews'=>$advNews,
          'rankNews'=>$rankNews,
          
      ));
     
      $this->display(); 
    }
    
    
    
    
    
    
    
    }